﻿@model Code_Type
@{
    ViewBag.Title = "TypeEdit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="main-container">
    <div class="modal-form">
        <div class="modal-form-body">
            <form id="Form" method="post" class="form-horizontal margin10-t">
                @Html.HiddenFor(m => Model.ID)
                <div class="contrl">
                    <label>类型号</label>
                    <input type="text" class="input" value="@Model.Type_Code" name="Type_Code">
                </div>
                <div class="contrl">
                    <label>角色序号</label>
                    <input type="text" class="input" name="Type_Name" value="@Model.Type_Name">
                </div>
            </form>
        </div>
        <div class="modal-form-footer">
            <input type="button" class="btn-primary" value="保存" onclick="EditSubmit('System', 'TypeEdit', 'TypeList')" />
            <input type="button" class="btn-secondary" value="取消" onclick="CloseModelFrame()">
        </div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#Form").validate({
            rules: {
                Type_Code: {
                    required: true,
                    maxlength: 15
                },
                Type_Name: {
                    required: true,
                    maxlength: 50
                }
            },
            messages: {
                Type_Code: {
                    required: "请输入类型号",
                    maxlength: "长度最多为15"
                },
                Type_Name: {
                    required: "请输入类型名称",
                    maxlength: "长度最多为50"
                }
            },
            errorElement: "em"
        });
    });
</script>